package com.meituan.sdk.model.ddzhkh.shangpin.productRelationshipStatusUpdate;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* （体检加项）开启/关闭/删除 关联关系
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/shangpin/relationship/status/update",
    businessId = 59,
    apiVersion = "10061",
    apiName = "product_relationship_status_update",
    needAuth = true
)
public class ProductRelationshipStatusUpdateRequest implements MeituanRequest<ProductRelationshipStatusUpdateResponse> {
    /**
    * <p data-diff-id="ct-diff-id-ce7d7d42-5d32-4f81-9f1b-dc12d3841646">操作类型（3：上线 4：下线 5：删除）</p><p data-diff-id="ct-diff-id-dc9a03a3-6996-4a4a-a31b-e1fbde1526f5"><br></p>
    */
    @NotNull(message = "operateType不能为空")
    @SerializedName("operateType")
    private Integer operateType;
    /**
    * <p data-diff-id="ct-diff-id-ed7d53ca-5590-4fdd-805f-c39d6baf73bf">更新关联关系-状态集合</p><p data-diff-id="ct-diff-id-a5683c2e-f7f7-48c3-9661-93ad7871eac6"><br></p>
    */
    @NotEmpty(message = "updateRelationStatusDTOS不能为空")
    @SerializedName("updateRelationStatusDTOS")
    private List<UpdateRelationStatusDTO> updateRelationStatusDTOS;

    public Integer getOperateType() {
        return operateType;
    }
    public void setOperateType(Integer operateType) {
        this.operateType = operateType;
    }
    public List<UpdateRelationStatusDTO> getUpdateRelationStatusDTOS() {
        return updateRelationStatusDTOS;
    }
    public void setUpdateRelationStatusDTOS(List<UpdateRelationStatusDTO> updateRelationStatusDTOS) {
        this.updateRelationStatusDTOS = updateRelationStatusDTOS;
    }


    @Override
    public MeituanResponse<ProductRelationshipStatusUpdateResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<ProductRelationshipStatusUpdateResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "ProductRelationshipStatusUpdateRequest{" + "operateType=" + operateType + "," + "updateRelationStatusDTOS=" + updateRelationStatusDTOS + "}";
    }
}
